From: Richard M. Stallman Date: Sun, 13 Jun 1993 04:34:58 +0000 (+0000) Subject: (Man-getpage-in-background): Use TERM=dumb to prevent X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95347 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=82c9fe8e256c68971ac60ebde5bca11111130ea5;p=emacs.git (Man-getpage-in-background): Use TERM=dumb to prevent terminal control sequences in the output. --- diff --git a/lisp/man.el b/lisp/man.el index 2b0f26e8bfe..48c61af24e9 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -445,9 +445,12 @@ Man-reuse-okay-p is non-nil." (Man-notify-when-ready buffer) (message "Invoking man %s in background..." man-args) (setq buffer (generate-new-buffer bufname)) - (set-process-sentinel - (start-process "man" buffer "sh" "-c" - (format (Man-build-man-command) man-args)) + (let ((process-environment process-environment)) + ;; Prevent any attempt to use display terminal fanciness. + (setenv "TERM" "dumb") + (set-process-sentinel + (start-process "man" buffer "sh" "-c" + (format (Man-build-man-command) man-args))) 'Man-bgproc-sentinel)) ))